Optimal. Leaf size=73 \[ -\frac {2 c \log (x) (b c-a d)}{a^3}+\frac {2 c (b c-a d) \log (a+b x)}{a^3}-\frac {(b c-a d)^2}{a^2 b (a+b x)}-\frac {c^2}{a^2 x} \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {88} \begin {gather*} -\frac {(b c-a d)^2}{a^2 b (a+b x)}-\frac {2 c \log (x) (b c-a d)}{a^3}+\frac {2 c (b c-a d) \log (a+b x)}{a^3}-\frac {c^2}{a^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x^2 (a+b x)^2} \, dx &=\int \left (\frac {c^2}{a^2 x^2}+\frac {2 c (-b c+a d)}{a^3 x}+\frac {(-b c+a d)^2}{a^2 (a+b x)^2}-\frac {2 b c (-b c+a d)}{a^3 (a+b x)}\right ) \, dx\\ &=-\frac {c^2}{a^2 x}-\frac {(b c-a d)^2}{a^2 b (a+b x)}-\frac {2 c (b c-a d) \log (x)}{a^3}+\frac {2 c (b c-a d) \log (a+b x)}{a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 67, normalized size = 0.92 \begin {gather*} \frac {-\frac {a (b c-a d)^2}{b (a+b x)}+2 c \log (x) (a d-b c)+2 c (b c-a d) \log (a+b x)-\frac {a c^2}{x}}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(c+d x)^2}{x^2 (a+b x)^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.73, size = 149, normalized size = 2.04 \begin {gather*} -\frac {a^{2} b c^{2} + {\left (2 \, a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} x - 2 \, {\left ({\left (b^{3} c^{2} - a b^{2} c d\right )} x^{2} + {\left (a b^{2} c^{2} - a^{2} b c d\right )} x\right )} \log \left (b x + a\right ) + 2 \, {\left ({\left (b^{3} c^{2} - a b^{2} c d\right )} x^{2} + {\left (a b^{2} c^{2} - a^{2} b c d\right )} x\right )} \log \relax (x)}{a^{3} b^{2} x^{2} + a^{4} b x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.14, size = 111, normalized size = 1.52 \begin {gather*} \frac {b c^{2}}{a^{3} {\left (\frac {a}{b x + a} - 1\right )}} - \frac {2 \, {\left (b^{2} c^{2} - a b c d\right )} \log \left ({\left | -\frac {a}{b x + a} + 1 \right |}\right )}{a^{3} b} - \frac {\frac {b^{3} c^{2}}{b x + a} - \frac {2 \, a b^{2} c d}{b x + a} + \frac {a^{2} b d^{2}}{b x + a}}{a^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 106, normalized size = 1.45 \begin {gather*} \frac {2 c d}{\left (b x +a \right ) a}-\frac {b \,c^{2}}{\left (b x +a \right ) a^{2}}+\frac {2 c d \ln \relax (x )}{a^{2}}-\frac {2 c d \ln \left (b x +a \right )}{a^{2}}-\frac {2 b \,c^{2} \ln \relax (x )}{a^{3}}+\frac {2 b \,c^{2} \ln \left (b x +a \right )}{a^{3}}-\frac {d^{2}}{\left (b x +a \right ) b}-\frac {c^{2}}{a^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.99, size = 93, normalized size = 1.27 \begin {gather*} -\frac {a b c^{2} + {\left (2 \, b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x}{a^{2} b^{2} x^{2} + a^{3} b x} + \frac {2 \, {\left (b c^{2} - a c d\right )} \log \left (b x + a\right )}{a^{3}} - \frac {2 \, {\left (b c^{2} - a c d\right )} \log \relax (x)}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.39, size = 101, normalized size = 1.38 \begin {gather*} \frac {4\,c\,\mathrm {atanh}\left (\frac {2\,c\,\left (a\,d-b\,c\right )\,\left (a+2\,b\,x\right )}{a\,\left (2\,b\,c^2-2\,a\,c\,d\right )}\right )\,\left (a\,d-b\,c\right )}{a^3}-\frac {\frac {c^2}{a}+\frac {x\,\left (a^2\,d^2-2\,a\,b\,c\,d+2\,b^2\,c^2\right )}{a^2\,b}}{b\,x^2+a\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.84, size = 173, normalized size = 2.37 \begin {gather*} \frac {- a b c^{2} + x \left (- a^{2} d^{2} + 2 a b c d - 2 b^{2} c^{2}\right )}{a^{3} b x + a^{2} b^{2} x^{2}} + \frac {2 c \left (a d - b c\right ) \log {\left (x + \frac {2 a^{2} c d - 2 a b c^{2} - 2 a c \left (a d - b c\right )}{4 a b c d - 4 b^{2} c^{2}} \right )}}{a^{3}} - \frac {2 c \left (a d - b c\right ) \log {\left (x + \frac {2 a^{2} c d - 2 a b c^{2} + 2 a c \left (a d - b c\right )}{4 a b c d - 4 b^{2} c^{2}} \right )}}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________